http://installion.co.uk/ubuntu/xenial/universe/t/tesseract-ocr/install/index.html
https://github.com/tesseract-ocr/tesseract/wiki
1. Install tesseract-ocr
$ sudo apt-get update
$ sudo apt-get install tesseract-ocrTo uninstall tesseract-ocr
http://installion.co.uk/ubuntu/xenial/universe/t/tesseract-ocr/uninstall/index.html
$ sudo apt-get remove tesseract-ocrThis will remove just the tesseract-ocr package itself.
To uninstall tesseract-ocr and its dependencies
$ sudo apt-get remove --auto-remove tesseract-ocrThis will remove the tesseract-ocr package and any other dependant packages which are no longer needed.
Purging your config/data too
If you also want to delete your local/config files for tesseract-ocr then this will work. Caution! Purged config/data can not be restored by reinstalling the package.
$ sudo apt-get purge tesseract-ocrOr similarly, like this tesseract-ocr
$ sudo apt-get purge --auto-remove tesseract-ocr2. Download the appropriate training data
https://github.com/tesseract-ocr/tessdata
Download the latest training data file (e.g., ‘eng.traineddata') into the ‘tessdata' directory at ‘/usr/share/tesseract-ocr/tessdata' :
$ cd /usr/share/tesseract-ocr/tessdataWe will delete the current training data file before we get the latest available:
$ sudo rm -r eng.traineddataThen,
$ sudo wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddataIf necessary:
Force Nextcloud to rescan files:
$ cd /var/www/html/nextcloud
$ sudo -u www-data php console.php files:scan --all